package cn.itcast.www.javaTest;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class JavaTest {
	public static <T> void varargs(T... arr) {
		System.out.println(arr.length);
		for(T temp : arr){
			System.out.println(temp);
		}
	}
	public static void copyArrayToCollecttion(Object[] a, Collection c){
	    for(Object o : a){
	        c.add(o);//c的数据类型是Collection<Object>
	    }
	}
	
	public static void test(List<? super Integer> c){
		List<? super Integer> list = new ArrayList<Integer>();
	    for(int i = 0; i < c.size(); i++){
	    	
	        System.out.println(c.get(i));
	    }
	}


}
